home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / OS / FWMemory / Include / FWPlatMe.h < prev   
Encoding:
Text File  |  1994-04-21  |  1.8 KB  |  62 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPlatMe.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef FWPLATME_H
  13. #define FWPLATME_H
  14.  
  15. #ifndef FWPRIDEB_H
  16. #include <FWPriDeb.h>
  17. #endif
  18.  
  19. #include <StdDef.h>
  20. #include <Assert.h>
  21.  
  22. #include <Memory.h>
  23.  
  24.  
  25. //========================================================================================
  26. // Type definitions
  27. //========================================================================================
  28.  
  29. #ifdef __xlC
  30. typedef unsigned long SIZE_T;
  31. #else
  32. typedef size_t SIZE_T;
  33. #endif
  34.  
  35.  
  36. //========================================================================================
  37. // Defines
  38. //========================================================================================
  39.  
  40. #define PLATFORM_ASSERT(condition) FW_ASSERT(condition)
  41. #define PLATFORM_DEBUGGER_STRING(string) // DebugStr("\p##string")
  42. #define PLATFORM_PRINT_STRING(string) // fprintf(stderr, string)
  43.  
  44.  
  45. //========================================================================================
  46. // Global function declarations
  47. //========================================================================================
  48.  
  49. void *PlatformAllocateBlock(size_t size);
  50. void PlatformFreeBlock(void *ptr);
  51.  
  52. //----------------------------------------------------------------------------------------
  53. // PlatformCopyMemory
  54. //----------------------------------------------------------------------------------------
  55.  
  56. inline void PlatformCopyMemory(void *source, void *destination, size_t length)
  57. {
  58.     BlockMove(source, destination, (Size) length);
  59. }
  60.  
  61. #endif
  62.